package elion.com.theElion.util;

/**
 * Created by xiaon on 2017/6/9.
 */

public class Info {
    //测试用
    private static String ip = "192.168.1.108";
    private static String port = "8080";

//        真正的服务器和端口
//    private static String ip = "112.245.17.86";
//    private static String port = "18081";


    public static String path_SelectFuwu(int start, int end) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectFuwuServlet?start=" + start + "&end=" + end;
        return path;
    }

    public static String path_SelectChamical(String landid, String depth, String number) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectChamicalServlet?land_id=" + landid + "&depth=" + depth + "&number=" + number;
        return path;
    }

    public static String path_SelectDecision(int start, int end) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectDecisionServlet?start=" + start + "&end=" + end;
        return path;
    }

    public static String path_SelectDrought(int start, int end) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectDroughtServlet?start=" + start + "&end=" + end;
        return path;
    }

    public static String path_SelectConsult(int start, int end) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectConsultServlet?start=" + start + "&end=" + end;
        return path;
    }

    public static String path_SelectGancaoPest(int start, int end) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectGancaoPestServlet?start=" + start + "&end=" + end;
        return path;
    }

    public static String path_SelectLand(String number) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectLandServlet?number=" + number;
        return path;
    }

    public static String path_SelectQiXiang(String landnumber, String number) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectQiXiangServlet?land_number=" + landnumber + "&number=" + number;
        return path;
    }

    public static String path_SelectRoucrPest(int start, int end) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectRoucrPestServlet?start=" + start + "&end=" + end;
        return path;
    }

    public static String path_SelectSeed(int type, int id) {
        String path = null;
        if (type == 3) {
            path = "http://" + ip + ":" + port + "/ElionService/SelectSeedServlet?type="
                    + type + "&&family_id=" + id;
        } else {
            path = "http://"+ ip + ":" + port +"/ElionService/SelectSeedServlet?type="
                    + type + "&&pid=" + id;
        }
        System.out.println("path_SelectSeed");
        System.out.println(path);
        return path;
    }

    public static String path_SelectSoil(String landnumber, String number) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectSoilServlet?land_number=" + landnumber + "&number=" + number;
        return path;
    }

    public static String path_SelectSuggest(int start, int end) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectSuggestServlet?start=" + start + "&end=" + end;
        return path;
    }

    public static String path_SelectWater(String landnumber, String number) {
        String path = "http://" + ip + ":" + port + "/ElionService/SelectWaterServlet?land_number=" + landnumber + "&number=" + number;
        return path;
    }
}
